<?php
	require('config.php');
	$orderId=$_REQUEST['orderId'];
	$sql="SELECT * FROM ".$oto."_orders,".$oto."_order_goods where ".$oto."_orders.orderId=".$oto."_order_goods.orderId and ".$oto."_orders.orderId='{$orderId}' ";
	$result=$db->query($sql);
	while($row=$result->fetch_assoc()){
		$order_info[]=$row;//将取得的所有数据赋值给person_info数组
	}
	if(isset($order_info))
	{
		$shopId=$order_info[0]['shopId'];
		$sql="SELECT * FROM ".$oto."_shops where shopId='{$shopId}' ";
		$result=$db->query($sql);
		while($row=$result->fetch_assoc()){
			$shops[]=$row;//将取得的所有数据赋值给person_info数组
		}
		if(isset($shops))
		{
			$order_info[0]['shopName']=$shops[0]['shopName'];
		}
		else $order_info[0]['shopName']='';
		echo json_encode($order_info);
	}
	else echo '[]';
?>